<script setup lang="ts">
import {NButton} from "naive-ui";
import {Icon} from "@iconify/vue";

const {message = '你确定删除吗', onConfirm} =defineProps<{
  message?: string
  onConfirm: (...params:any[]) => void
}>()
</script>

<template>
  <n-popconfirm  @positive-click="onConfirm">
    <template #trigger>
      <n-button :type="'error'">
        <template #icon>
          <Icon icon="material-symbols-light:delete-outline-rounded" width="24" height="24" />
        </template>
      </n-button>
    </template>
    {{message}}
  </n-popconfirm>
</template>

<style scoped>

</style>
